﻿<UserControl x:Class="GBlason.Control.CustomUserControl.ShapeViewerUC"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ViewModel="clr-namespace:GBlason.ViewModel"
             xmlns:CustomUserControl="clr-namespace:GBlason.Control.CustomUserControl"
             xmlns:Tools="clr-namespace:GBlason.Common.Tools" mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
             x:Name="ShapeViewerUserControl"
             DataContext="{Binding ElementName=ShapeViewerUserControl}"
             d:DataContext="{x:Static Tools:DesignTimeViewModel.DesignTimeShapeViewer}">
    <DockPanel>
        <TextBlock Text="{Binding Path=Shape.LocalizedName}" HorizontalAlignment="Center" VerticalAlignment="Stretch" MinHeight="20" DockPanel.Dock="Bottom" Margin="2"/>
        <Viewbox x:Name="shapeViewer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="2">
            <Path Data="{Binding Path=Shape.Geometry}"
                  Stroke="{Binding Path=Stroke}"
                  StrokeThickness="{Binding Path=StrokeThickness}"
                  Fill="{Binding Path=Fill}">
            </Path>
        </Viewbox>
    </DockPanel>
</UserControl>
